package com.longrise.android.byjk.plugins.hra.hratabsecond;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


/**
 * Created by Administrator on 2018/1/9.
 * 我的预约--viewpager的adapter
 */

public class MineAppointPagerAdapter extends FragmentPagerAdapter {

    private String[] mTitles = {"待检测","已检测"};

    public MineAppointPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        MineAppointDetailFragment fragment = new MineAppointDetailFragment();
        Bundle bundle = new Bundle();
        bundle.putString(MineAppointDetailFragment.ORDERSTATE,mTitles[position]);
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public int getCount() {
        return mTitles.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles[position];
    }
}
